package com.mac.intellect_flow.framework.security.handle;

import org.springframework.security.core.GrantedAuthority;

public class SimGrantedAuthority implements GrantedAuthority {
    private String authority;

    public SimGrantedAuthority(String authority) {
        this.authority = authority;
    }

    public SimGrantedAuthority() {
    }

    @Override
    public String getAuthority() {
        return this.authority;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        } else {
            return obj instanceof SimGrantedAuthority ? this.authority.equals(((SimGrantedAuthority)obj).authority) : false;
        }
    }

    public int hashCode() {
        return this.authority.hashCode();
    }

    public String toString() {
        return this.authority;
    }

}
